package org.lex.utils;

public class Stopwatch {
	private long startTime = 0L;

	public Stopwatch() {
		super();
		this.start();
	}

	public synchronized long restart() {
		long count = this.count();
		this.start();
		return count;
	}

	public synchronized long start() {
		this.startTime = System.currentTimeMillis();
		return this.startTime;
	}

	public synchronized long count() {
		return System.currentTimeMillis() - this.startTime;
	}
}
